<template>
    <wd-overlay :show="show" @click="emits('close')" :zIndex="99999">
        <view class="wrapper">
            <view class="tip">
                <view class="tooltip-box">换电前请先绑定您的爱车哦！</view>
            </view>
        </view>
    </wd-overlay>
</template>

<script setup>
const props = defineProps({
    show: {
        default: false,
        type: Boolean
    }
})

const emits = defineEmits(['close'])
</script>

<style lang="scss" scoped>
.wrapper {
    display: flex;
    justify-content: flex-end;
    /* 水平右对齐 */
    align-items: flex-end;
    /* 垂直底部对齐 */
    height: 100%;
    width: 100%;

}

.tooltip-box {
    position: relative;
    width: 200px;
    padding: 15px;
    background-color: #649270;
    color: white;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    margin: 0 30rpx 30rpx 0;
    text-align: center;
}

/* 下方居中小三角 */
.tooltip-box::after {
    content: '';
    position: absolute;
    top: 98%;
    left: 67%;
    transform: translateX(-50%);
    border-width: 10px;
    border-style: solid;
    border-color: #649270 transparent transparent transparent;
    font-size: 30rpx;
}
</style>